export const debounce = (fn, wait) => {
  var timeout = null
  return function (e) {
    clearTimeout(timeout)
    timeout = setTimeout(() => {
      fn.apply(this, arguments)
    }, wait)
  }
}
